Boolean is a variable type with two posible values: true, and false. The default value of a boolean is flase.
Make a new boolean:
  • boolean x = false;
Modify a boolean:
  • x = !x; set x to false if x is true before the statement is called
example:
  • if( true) is equivalent to if( ture == ture) always true ;
  • if( !true) is equivalent to if( false == true) //always false;